import jsonschema

data = {
    "data": "091516"
}

schema = {
    "type": "object",
    "properties": {
        "data": {"pattern": "[0-9]{4}"}
    }
}
result = jsonschema.validate(instance=data, schema=schema)
print(result)
